<template>
  <div :class="['tag', 'tag' + status]">
    {{ statusName }}
  </div>
</template>

<script>

import { AuditStatus, getName } from '@/dict'

export default {
  name: 'StatusTag',
  props: {
    status: [String, Number],
    statusList: {
      type: Array,
      default: AuditStatus
    }
  },
  data() {
    return {}
  },
  computed: {
    statusName() {
      return getName(this.status, this.statusList)
    }
  },
  methods: {}
}
</script>

<style scoped lang="scss">
.tag  {
    width: 64px;
    background: #FFF2CF;
    font-size: 14px;
    line-height: 14px;
    font-family: Source Han Sans CN;
    font-weight: bold;
    text-align: center;
    padding: 7px 0;
}
.tag0 {
    background: #FFF2CF;
    color: #F8BE22;
    border: 1px solid #F8BE22;
}
.tag1 {
    color: #15C521;
    background: #DDFFDE;
    border: 1px solid #15C521;
}
.tag2 {
    color: #F82222;
    background: #ffe2e2;
    border: 1px solid #F82222;
}
</style>
